package cn.edu.ujn.bmis.service.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import cn.edu.ujn.bmis.dao.UserInfoDao;
import cn.edu.ujn.bmis.model.UserInfo;
import cn.edu.ujn.bmis.service.UserInfoManager;

@Component("userInfoManager")
public class UserInfoManagerImp implements UserInfoManager {

	private UserInfoDao userInfoDao;

	public boolean addUser(UserInfo userInfo) {
		return userInfoDao.saveUser(userInfo);
	}

	public List<UserInfo> findUserInfo(String hql) {
		return userInfoDao.findUserInfo(hql);
	}

	public UserInfoDao getUserInfoDao() {
		return userInfoDao;
	}

	@Resource(name = "userInfoDao")
	public void setUserInfoDao(UserInfoDao userInfoDao) {
		this.userInfoDao = userInfoDao;
	}

	public boolean update(String hql) {
		return userInfoDao.update(hql);
	}

	public boolean update(UserInfo userInfo) {
		return userInfoDao.update(userInfo);
	}
}
